package cn.tedu.csmall.passport.security;

import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.User;

import java.util.Collection;

/**
 * 对原有的UserDetails进行了扩展, 加了个id  便于后续使用
 *
 */
@ToString(callSuper = true)
@Getter
@Setter
@EqualsAndHashCode
public class AdminDetails extends User {

    private Long id;



    public AdminDetails(String username,
                        String password,
                        boolean enabled,
                        Collection<? extends GrantedAuthority> authorities) {
        super(username, password, enabled,
                true,true,true,
                authorities);
    }
}
